//
// Created by 谢哲 on 2021/5/17.
//

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;

int m;
int get_bottom_x(int k) {
    int pos = 0;
    for (int i=0; i<k; ++i) {
        if (i%2==0) pos += 4;
        else pos += 2;
    }

    return pos;
}

pair<int, int> get_pos(int layer, int k) {
    if (layer == m) return make_pair(get_bottom_x(k), 0);
    int left_x = 1, gap_x = 2;
    for (int i=1; i<m-layer; ++i) {
        left_x <<= 1;
        gap_x <<= 1;
    }
    int xn = left_x + k * gap_x - 1;
    int x = (get_bottom_x(xn)+get_bottom_x(xn+1)) / 2;
    int y = (get_bottom_x(left_x-1)+get_bottom_x(left_x)) / 2;
    return make_pair(x, y);
}

int layer_k_to_index(int layer, int k) {
    return (1 << (layer-1)) + k;
}

vector<string> ans;

void dfs(int layer, int k, vector<bool> &exists) {
    if (!exists[layer_k_to_index(layer, k)]) return;
    auto cur_pos = get_pos(layer, k);
    ans[cur_pos.second][cur_pos.first] = 'o';
    if (layer==m) return;
    if (exists[layer_k_to_index(layer+1, k*2)]) {
        auto nxt_pos = get_pos(layer+1, k*2);
        for (int i=cur_pos.first-1, j=cur_pos.second-1;i!=nxt_pos.first;--i,--j) {
            ans[j][i] = '/';
        }
        dfs(layer+1, k*2, exists);
    }
    if (exists[layer_k_to_index(layer+1, k*2+1)]) {
        auto nxt_pos = get_pos(layer+1, k*2+1);
        for (int i=cur_pos.first+1, j=cur_pos.second-1;i!=nxt_pos.first;++i,--j) {
            ans[j][i] = '\\';
        }
        dfs(layer+1, k*2+1, exists);
    }
}

int main() {
    int n;
    cin >> m >> n;

    vector<bool> exists(pow(2, m), true);
    int width = get_bottom_x((1<<(m-1))-1)+1;
    string s;
    for (int i=0; i<width; ++i) s+= " ";
    int height = get_pos(1, 0).second+1;
    ans.resize(height, s);

    for (int i=0; i<n; ++i) {
        int layer, k;
        cin >> layer >> k;
        --k;
        exists[layer_k_to_index(layer, k)] = false;
    }

    dfs(1, 0, exists);
    for (auto p=ans.rbegin(); p!=ans.rend(); ++p) {
        cout << *p << "\n";
    }

    return 0;
}